<?php
/**
 * common model file Created by PhpStorm.
 * User: wumengmeng
 * Date: 2020/03/18
 * Time: 15:26
 */

namespace HiCommon\Model;

class MaintainVehicleModel extends Base
{

    protected $table = 'maintain_vehicle_model';

    protected $guarded = [];

    //一对多
    public function vehicle_model()
    {
        return $this->hasOne(VehicleModel::class, 'id', 'vehicle_model_id')
            ->with(['parent'])
            ->select('id', 'name', 'fullname', 'parentid', 'depth');
    }


}